import { getResPath } from '@/utils/cimup';

/**
 * 基础底图
 */
const dataSourceUrl =
  process.env.NODE_ENV === 'development' ? '/cimup/images/globe.png' : '/images/globe.png';

/**
 * 场景默认配置
 */
export const defaultMapObject = {
  view: {
    longitude: 121.92878028208328,
    latitude: 30.089004097298577,
    height: 25000000,
    duration: 3,
    heading: 6.2831853071795765,
    pitch: -1.570782970133429,
    maxDistance: 25000000,
    initViewStatically: true,
  },
  materialMap: {
    dataSourceUrl: getResPath('comm/public/config/MMT.json'),
  },
  light: {
    shadows: true,
    size: 4096,
    softShadows: true,
    enableLighting: true,
    lightType: 'sunlight',
    color: '#FFFFFF',
  },
  layers: [
    {
      enable: true,
      index: 0,
      type: 'base',
      mapType: 'SINGLEIMAGE',
      dataSourceUrl: dataSourceUrl,
      extent: [-180, -90, 180, 90],
    },
    {
      enable: true,
      index: 500,
      type: 'divTool',
    },
  ],
  postProcess: [
    {
      name: 'fxaa',
      enabled: true,
    },
  ],
};
